<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="dragon.core.util.GlobalParameter"%>
<%@page import="dragon.core.system.po.SysUser"%>
<%@ include file="../../../taglib.jsp"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<%
	SysUser user = (SysUser) session.getAttribute(GlobalParameter.User);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<base href="<%=basePath%>" />
<title>用户信息</title>
<link rel="stylesheet" type="text/css" href="css/oper_area.css" />
<link rel="stylesheet" type="text/css" href="css/dialog.css" />
<%@ include file="/webmodules/console/css.jsp"%>
<%@ include file="/webmodules/console/js.jsp"%>
<script type="text/javascript">
	function save() {
		var username = $("#username").val();
		var pwd = $("#pwd").val();
		var email = $("#email").val();
		var phone = $("#phone").val();
		$.post("dragon/modules/system/user/action/UserHandler/modUser.ejw", {
			id : '<%=user.getId()%>',
			username : username,
			pwd : pwd,
			email : email,
			phone : phone
		}, function(data) {
			if (data == "t") {
				top.showMsg("", "保存成功！", false);
				top.closeWindow('SelfInfo');
			} else {
				top.showMsg("", "保存失败！" + data, true);
			}
		});
	};
</script>
</head>
<body>
	<div style="width: 100%; height: 100%; overflow: auto;">
		<form id="myform" method="post">
			<table style="width: 100%;">
				<tr>
					<td class="table-cell-title">用户名：</td>
					<td class="table-cell-input"><input type="text" id="username" value="<%=user.getUsername()%>" /></td>
				</tr>
				<tr>
					<td class="table-cell-title">密码：</td>
					<td class="table-cell-input"><input type="text" id="pwd" value="" /> <font color="red">如需修改请填写新密码，不填不修改</font></td>
				</tr>
				<tr>
					<td class="table-cell-title">邮箱：</td>
					<td class="table-cell-input"><input type="text" id="email" value="<%=user.getEmail() != null ? user.getEmail() : ""%>" /></td>
				</tr>
				<tr>
					<td class="table-cell-title">手机：</td>
					<td class="table-cell-input"><input type="text" id="phone" value="<%=user.getPhone() != null ? user.getPhone() : ""%>" /></td>
				</tr>
			</table>
		</form>
		<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="dialog_button_bar">
			<tbody>
				<tr>
					<td>
						<div align="right">
							<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-ok" onclick="save();">确定</a> <a href="javascript:void(0);" " class="easyui-linkbutton" iconCls="icon-cancel"
								onclick="top.closeWindow('SelfInfo');">关闭</a>
						</div>
					</td>
				</tr>
			</tbody>
		</table>
	</div>
</body>
</html>